#include "GUIManager.h"

namespace egg{

    void GUIManager::startup(){
        using namespace MyGUI;
        mPlatform=new EggPlatform();
        mPlatform->initialise("MyGUI.log");
        mGUI=new Gui();
        mGUI->initialise("MyGUI_Core.xml");
        mInputMgr=InputManager::getInstancePtr();
        mRenderMgr=mPlatform->getRenderManagerPtr();
        mDataMgr=mPlatform->getDataManagerPtr();
        mDataMgr->addResourceLocation("./media",false);
        PointerManager::getInstance().setVisible(false);
    }

    void GUIManager::runFrame(){
        mRenderMgr->runFrame();
    }

    void GUIManager::setSize(uint32 _w,uint32 _h){
        mRenderMgr->setViewSize(_w,_h);
    }

}